import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from '@/router/index.js'
import { directivePlugin } from '@/directives/directivePlugin.js'
import { componentPlugin } from '@/components'
//pinia持久化插件
import persist from 'pinia-plugin-persistedstate'

// 引入初始化样式文件
import '@/styles/common.scss'
//  注册路由器插件
const app = createApp(App)

const pinia = createPinia() //创建Pinia实例
pinia.use(persist)
app.use(router)
app.use(directivePlugin)
app.use(componentPlugin)
app.use(pinia)
app.mount('#app')
